// roughly correspond to the PHP variables:

function hoverOn(obj)
{
	obj.style.background = "rgb(43, 49, 134)";
	/*obj.style.opacity = 1.0;
	obj.style.filter = 'alpha(opacity=100)';*/
}

function hoverOff(obj)
{
	obj.style.background = "rgb(25, 29, 79)";
	/*obj.style.opacity = 0.75;
	obj.style.filter = 'alpha(opacity=75)';*/
}

function clickOn(obj)
{
	parent.level++;
	
	switch (parent.level)
	{
		case 1:			//select media type
			parent.destUser = obj.getAttribute("destUser");
			break;
		case 2:			//select album
			parent.destType = obj.getAttribute("destType");
			break;	
		case 3:			//select item
			parent.destAlbumId = obj.getAttribute("destAlbumId");
			break;
		case 4:			//view item
			parent.destItemId = obj.getAttribute("destItemId");
			break;
	}
	
	var items = document.getElementsByClassName('item');
	for (var i = 75; i > 10; i--)
	{
		for (var j = 0; j < items.length; j++)
		{
			if (items[j].id != obj.getAttribute('innerId'))
			{
				/*items[j].style.opacity = '.' + i;
				//alert(items[j].style.opacity);
				items[j].style.filter = 'alpha(opacity=' + i + ')';*/
			}
		}
		
		for (var j = 0; j < 100; j++)
		{
			var l = 0;
		}
	}
	
	
	
	parent.initShowcase();
}

document.getElementsByClassName = function(cl) {
var retnode = [];
var myclass = new RegExp('\\b'+cl+'\\b');
var elem = this.getElementsByTagName('*');
for (var i = 0; i < elem.length; i++) {
var classes = elem[i].className;
if (myclass.test(classes)) retnode.push(elem[i]);
}
return retnode;
};